from transformers import pipeline
question_answerer = pipeline(
    task="question-answering",
    model=r"/opt/model/roberta-base-finetuned-dianping-chinese", # 中文实体识别优化，精度高
    device="cpu"
)

result = question_answerer(question="What is the name of the repository?",
                           context="The name of the repository is huggingface/transformers")
print("question-answering：", result)